import request from "@/utils/request";

// 门店照片上传
export function uploadShopImg(data) {
  return request({
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    url: '/shop/branch/upload/file',
    method: 'post',
    data: data
  })
}

export function storesRoleList(query) {
  return request({
    url: '/shop/branch/list',
    method: 'get',
    params: query
  })
}

export function getGpsData(query) {
  return request({
    url: '/gps/list',
    method: 'get',
    params: query
  })
}

export function addStores(query) {
  return request({
    url: '/shop/branch',
    method: 'post',
    data: query
  })
}

export function putStores(data) {
  return request({
    url: '/shop/branch',
    method: 'put',
    data: data
  })
}
export function delStores(data) {
  return request({
    url: '/shop/branch/'+data,
    method: 'delete'
  })
}
export function delGPS(data) {
  return request({
    url: '/gps/'+data,
    method: 'delete'
  })
}

export function getBranchAdmin(query) {
  return request({
    url: '/shop/branchadmin/list',
    method: 'get',
    params: query
  })
}

export function branchAdminDel(query) {
  return request({
    url: '/shop/branchadmin/'+query,
    method: 'delete'
  })
}
// /

export function branchAdminAdd(data) {
  return request({
    url: 'shop/branchadmin',
    data:data,
    method: 'post'
  })
}
